package sy.controller;

import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import sy.pageModel.DataGrid;
import sy.pageModel.Json;

public interface InterfCintroller<T> {
	/**
	 * 查询表格
	 * @param param
	 * @return
	 */
	@RequestMapping("/dataGrid")
	@ResponseBody
	public DataGrid dataGrid(@RequestParam Map<String, Object> params);
	/**
	 * 添加
	 * @param t
	 * @return
	 */
	@RequestMapping("/add")
	@ResponseBody
	public Json add(T t) ;
	/**
	 * 修改
	 * @param t
	 * @return
	 */
	@RequestMapping("/edit")
	@ResponseBody
	public Json edit(T t);
	/**
	 * 删除
	 * @param id
	 * @return
	 */
	@RequestMapping("/delete")
	@ResponseBody
	public Json delete(String id);
	/**
	 * 根据id查询数据
	 * @param id
	 * @return
	 */
	@RequestMapping("/selectByid")
	@ResponseBody
	public T selectByid(String  id);
}
